import { createRouter, createWebHistory } from 'vue-router'
import indexView from "@/views/indexView.vue";
import detailView from "@/views/detailView.vue";
import evaluationView from "@/views/evaluationView.vue";
import teacherView from "@/views/teachers/teacherView.vue";
import detailTeacher from "@/views/teachers/detailTeacher.vue";
import wellnessCenter from "@/views/wellnessCenter.vue";
import substanceView from "@/views/substanceView.vue";
import loginView from "@/views/loginView.vue";
import bookingView from "@/views/bookingView.vue";
import treeHoles from "@/views/treeHoles.vue";
import personalCenter from "@/views/personalCenter.vue";
import itSMine from "@/views/booking/itSMine.vue";
import launchCom from "@/views/booking/launchCom.vue";
import agreementCom from "@/views/booking/launch/tiem/agreementCom.vue";
import personalName from "@/views/personal/personalName.vue";
import avatarSwitch from "@/views/personal/personalSubstance/avatarSwitch.vue";
import detailArticle from "@/views/article/detailArticle.vue";
import articleList from "@/views/article/articleList.vue";
import addTreeHole from "@/components/tree/addTreeHole.vue";
import detailsTreeHole from "@/components/tree/detailsTreeHole.vue";
import detailEvaluation from "@/views/evaluation/detailEvaluation.vue";
import resultEvaluation from "@/views/evaluation/resultEvaluation.vue";
import EvaluationRecord from "@/views/personal/evaluationRecord.vue";
import MyCollection from "@/views/personal/myCollection.vue";
import reviseName from "@/views/personal/personalSubstance/reviseName.vue";
import bookingCiew from "@/views/personal/itSMineBooking/bookingCiew.vue";
import waitBegin from "@/views/personal/itSMineBooking/waitBegin.vue";
import deleteCancel from "@/views/personal/itSMineBooking/deleteCancel.vue";
import personalMessage from "@/views/personal/message/personalMessage.vue";
import messageDetails from "@/views/personal/message/messageDetails.vue";
import personslConsultation from "@/views/personal/personslConsultation.vue";
import consultationXq from "@/views/personal/consultation/consultationXq.vue";
import setUp from "@/views/personal/setUp.vue";
import reviseCellPhone from "@/views/personal/setUp/reviseCellPhone.vue";
import revisePassword from "@/views/personal/setUp/revisePassword.vue";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path:'/',
      redirect:'/index'
    },
    {
      path: '/index',
      name: 'index',
      component: indexView
    },
    {
      path: '/detail/:id',
      name: 'detail',
      component: detailView
    },
    {
      path: '/tree',
      component: treeHoles
    },
    {
      path: '/addTreeHole',
      component: addTreeHole
    },
    {
      path: '/detailsTreeHole',
      name:'detailsTreeHole',
      component: detailsTreeHole
    },
    {
      path: '/evaluation',
      component: evaluationView
    },
    {
      path: '/detailEvaluation',
      name:'detailEvaluation',
      component: detailEvaluation
    },
    {
      path: '/result',
      name:'result',
      component: resultEvaluation
    },
    {
      path: '/wellness',
      component: wellnessCenter
    },
    {
      path: '/teacherList',
      component: teacherView,
    },
    {
      path: '/teacherDetail',
      component: detailTeacher,
    },
    {
      path: '/substance',
      component: substanceView
    },
    {
      path: '/login',
      component: loginView
    },
    {
      path: '/booking',
      component: bookingView
    },
    {
      path: '/tree',
      component: treeHoles
    },
    {
      path: '/personal',
      component: personalCenter
    },
    {
      path: '/itSMine',
      component: itSMine
    },
    {
      path: '/launch',
      component: launchCom
    },
    {
      path: '/agreement',
      component: agreementCom
    },
    {
      path: '/personalName',
      component: personalName
    },
    {
      path: '/avatarSwitch',
      component: avatarSwitch
    },
    {
      path: '/revise',
      component: reviseName
    },
    {
      path: '/bookingC',
      component: bookingCiew
    },
    {
      path: '/consultation',
      component: personslConsultation
    },
    {
      path: '/consultationXq',
      component: consultationXq
    },
    {
      path: '/setUp',
      component: setUp
    },
    {
      path: '/reviseCellPhone',
      component: reviseCellPhone
    },
    {
      path: '/revisePassword',
      component: revisePassword
    },

        {
            path: '/articleDetail',
            component: detailArticle,
        },
        {
            path: '/articleList',
            component: articleList,
        },
        {
            path: '/record',
            component:EvaluationRecord
        },
        {
            path: '/collection',
            component:MyCollection
        },
      //   预约详情
      {
          path: '/waitBegin',
          component: waitBegin
      },
      //   删除预约
      {
          path: '/deleteCancel',
          component: deleteCancel
      },
      //我的消息
      {
          path: '/personalMessage',
          component: personalMessage
      },
      {
          path: '/messageDetails',
          component: messageDetails
      },
    ]
})

export default router
